<?php
class CategoriasController extends AppController {

	var $name = 'Categorias';
	var $uses= array('Categoria');
	
	
	function beforeFilter() {
		parent::beforeFilter();
		$this->Auth->allowedActions = array('*');
	}
	
	function listado(){
		$this->layout = "pdf";
		$this->Categoria->hasMany['Curso']['conditions']= "Curso.disponible=-1";
		$this->Categoria->hasMany['Curso']['order']= "Curso.nombre";
		$categorias = $this->Categoria->Find('all');
		$this->helpers[] = "Number";
		$this->set('categorias', $categorias);
	}

}
?>